<template>
	<span>
		<template v-for="(item, index) in options">
		      <template v-if="values.includes(parseInt(item.dictKey))">
		       {{ item.dictValue }}
		      </template>
		    </template>
	</span>
</template>

<script>
export default {
  name: 'DictTag',
  props: {
    options: {
      type: Array,
      default: null
    },
    value: [Number, String, Array]
  },
  computed: {
    values() {
      if (this.value !== null && typeof this.value !== 'undefined') {
        return Array.isArray(this.value) ? this.value : [this.value]
      } else {
        return []
      }
    }
  }
}
</script>

<style>

</style>
